﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RoboTrocity.Code.ObjectStates.ItemStates {
	abstract class ItemState : ObjectState {
		private Item attachedItem;

		public ItemState(Item newItem, Sprite _newSprite) 
			: base(_newSprite) {
			attachedItem = newItem;
		}

		public abstract void GetPickedUp(Player player);

		public Item AttachedItem {
			get { return attachedItem; }
			set { attachedItem = value; }
		}
		
		public override void Update(float elapsed) {
			base.Update(elapsed);
			AttachedItem.Position += AttachedItem.Velocity;
		}
	}
}
